FROM python:3.8-slim
# FROM sanicframework/sanic:3.8-latest

WORKDIR /lightweight-loan-risk-engine
COPY . .

RUN pip install --upgrade pip
RUN pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
# RUN pip install -r requirements.txt -i https://repo.huaweicloud.com/repository/pypi/simple

# 更新apt-get
RUN apt-get update

# libodbc2.so
RUN apt remove libodbc2
RUN apt install libodbc2 -y

# 安装gcc依赖
#RUN apt-get install build-essential -y
RUN apt-get install aptitude -y
RUN aptitude install build-essential -y


# 安装 libgomp1 服务
# RUN apk --no-cache add libgomp1
RUN apt-get install -y libgomp1
# 安装 ping 命令
# RUN apk --no-cache add iputils.
RUN apt-get install -y iputils-ping
# 安装 ps 命令
# RUN apk --no-cache add procps
RUN apt-get install -y procps

# nohup python main.py >main.log 2>&1 &
# CMD ["nohup", "python", "main.py" , ">main.log", "2>&1" ,"&"]
